package com.ecoolex.discount.sales.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.lang.NonNull;

public class DiscountProductInventoryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer offset;

    protected Integer rows;

    public DiscountProductInventoryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public DiscountProductInventoryExample orderBy(String orderByClause) {
        this.setOrderByClause(orderByClause);
        return this;
    }

    public DiscountProductInventoryExample orderBy(String ... orderByClauses) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < orderByClauses.length; i++) {
            sb.append(orderByClauses[i]);
            if (i < orderByClauses.length - 1) {
                sb.append(" , ");
            }
        }
        this.setOrderByClause(sb.toString());
        return this;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria(this);
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
        rows = null;
        offset = null;
    }

    public static Criteria newAndCreateCriteria() {
        DiscountProductInventoryExample example = new DiscountProductInventoryExample();
        return example.createCriteria();
    }

    public DiscountProductInventoryExample when(boolean condition, IExampleWhen then) {
        if (condition) {
            then.example(this);
        }
        return this;
    }

    public DiscountProductInventoryExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
        if (condition) {
            then.example(this);
        } else {
            otherwise.example(this);
        }
        return this;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return this.offset;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Integer getRows() {
        return this.rows;
    }

    public DiscountProductInventoryExample limit(Integer rows) {
        this.rows = rows;
        return this;
    }

    public DiscountProductInventoryExample limit(Integer offset, Integer rows) {
        this.offset = offset;
        this.rows = rows;
        return this;
    }

    public DiscountProductInventoryExample page(Integer page, Integer pageSize) {
        this.offset = page * pageSize;
        this.rows = pageSize;
        return this;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andInventoryIdIsNull() {
            addCriterion("discountproductinventory.InventoryId is null");
            return (Criteria) this;
        }

        public Criteria andInventoryIdIsNotNull() {
            addCriterion("discountproductinventory.InventoryId is not null");
            return (Criteria) this;
        }

        public Criteria andInventoryIdEqualTo(Integer value) {
            addCriterion("discountproductinventory.InventoryId =", value, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.InventoryId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andInventoryIdNotEqualTo(Integer value) {
            addCriterion("discountproductinventory.InventoryId <>", value, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.InventoryId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andInventoryIdGreaterThan(Integer value) {
            addCriterion("discountproductinventory.InventoryId >", value, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.InventoryId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andInventoryIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("discountproductinventory.InventoryId >=", value, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.InventoryId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andInventoryIdLessThan(Integer value) {
            addCriterion("discountproductinventory.InventoryId <", value, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.InventoryId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andInventoryIdLessThanOrEqualTo(Integer value) {
            addCriterion("discountproductinventory.InventoryId <=", value, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.InventoryId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andInventoryIdIn(List<Integer> values) {
            addCriterion("discountproductinventory.InventoryId in", values, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdNotIn(List<Integer> values) {
            addCriterion("discountproductinventory.InventoryId not in", values, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdBetween(Integer value1, Integer value2) {
            addCriterion("discountproductinventory.InventoryId between", value1, value2, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andInventoryIdNotBetween(Integer value1, Integer value2) {
            addCriterion("discountproductinventory.InventoryId not between", value1, value2, "inventoryId");
            return (Criteria) this;
        }

        public Criteria andProductIdIsNull() {
            addCriterion("discountproductinventory.ProductId is null");
            return (Criteria) this;
        }

        public Criteria andProductIdIsNotNull() {
            addCriterion("discountproductinventory.ProductId is not null");
            return (Criteria) this;
        }

        public Criteria andProductIdEqualTo(Integer value) {
            addCriterion("discountproductinventory.ProductId =", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.ProductId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andProductIdNotEqualTo(Integer value) {
            addCriterion("discountproductinventory.ProductId <>", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.ProductId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThan(Integer value) {
            addCriterion("discountproductinventory.ProductId >", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.ProductId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("discountproductinventory.ProductId >=", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.ProductId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andProductIdLessThan(Integer value) {
            addCriterion("discountproductinventory.ProductId <", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.ProductId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andProductIdLessThanOrEqualTo(Integer value) {
            addCriterion("discountproductinventory.ProductId <=", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.ProductId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andProductIdIn(List<Integer> values) {
            addCriterion("discountproductinventory.ProductId in", values, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotIn(List<Integer> values) {
            addCriterion("discountproductinventory.ProductId not in", values, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdBetween(Integer value1, Integer value2) {
            addCriterion("discountproductinventory.ProductId between", value1, value2, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotBetween(Integer value1, Integer value2) {
            addCriterion("discountproductinventory.ProductId not between", value1, value2, "productId");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberIsNull() {
            addCriterion("discountproductinventory.VoucherNumber is null");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberIsNotNull() {
            addCriterion("discountproductinventory.VoucherNumber is not null");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherNumber =", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherNumber = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherNumberNotEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherNumber <>", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherNumber <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherNumberGreaterThan(String value) {
            addCriterion("discountproductinventory.VoucherNumber >", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherNumber > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherNumberGreaterThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherNumber >=", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherNumber >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherNumberLessThan(String value) {
            addCriterion("discountproductinventory.VoucherNumber <", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherNumber < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherNumberLessThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherNumber <=", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherNumber <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherNumberLike(String value) {
            addCriterion("discountproductinventory.VoucherNumber like", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberNotLike(String value) {
            addCriterion("discountproductinventory.VoucherNumber not like", value, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberIn(List<String> values) {
            addCriterion("discountproductinventory.VoucherNumber in", values, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberNotIn(List<String> values) {
            addCriterion("discountproductinventory.VoucherNumber not in", values, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberBetween(String value1, String value2) {
            addCriterion("discountproductinventory.VoucherNumber between", value1, value2, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherNumberNotBetween(String value1, String value2) {
            addCriterion("discountproductinventory.VoucherNumber not between", value1, value2, "voucherNumber");
            return (Criteria) this;
        }

        public Criteria andVoucherPassIsNull() {
            addCriterion("discountproductinventory.VoucherPass is null");
            return (Criteria) this;
        }

        public Criteria andVoucherPassIsNotNull() {
            addCriterion("discountproductinventory.VoucherPass is not null");
            return (Criteria) this;
        }

        public Criteria andVoucherPassEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherPass =", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherPass = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherPassNotEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherPass <>", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherPass <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherPassGreaterThan(String value) {
            addCriterion("discountproductinventory.VoucherPass >", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherPass > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherPassGreaterThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherPass >=", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherPass >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherPassLessThan(String value) {
            addCriterion("discountproductinventory.VoucherPass <", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherPass < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherPassLessThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.VoucherPass <=", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.VoucherPass <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andVoucherPassLike(String value) {
            addCriterion("discountproductinventory.VoucherPass like", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassNotLike(String value) {
            addCriterion("discountproductinventory.VoucherPass not like", value, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassIn(List<String> values) {
            addCriterion("discountproductinventory.VoucherPass in", values, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassNotIn(List<String> values) {
            addCriterion("discountproductinventory.VoucherPass not in", values, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassBetween(String value1, String value2) {
            addCriterion("discountproductinventory.VoucherPass between", value1, value2, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andVoucherPassNotBetween(String value1, String value2) {
            addCriterion("discountproductinventory.VoucherPass not between", value1, value2, "voucherPass");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoIsNull() {
            addCriterion("discountproductinventory.UsedTransNo is null");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoIsNotNull() {
            addCriterion("discountproductinventory.UsedTransNo is not null");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoEqualTo(String value) {
            addCriterion("discountproductinventory.UsedTransNo =", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UsedTransNo = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUsedTransNoNotEqualTo(String value) {
            addCriterion("discountproductinventory.UsedTransNo <>", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UsedTransNo <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUsedTransNoGreaterThan(String value) {
            addCriterion("discountproductinventory.UsedTransNo >", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UsedTransNo > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUsedTransNoGreaterThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.UsedTransNo >=", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UsedTransNo >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUsedTransNoLessThan(String value) {
            addCriterion("discountproductinventory.UsedTransNo <", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UsedTransNo < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUsedTransNoLessThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.UsedTransNo <=", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UsedTransNo <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUsedTransNoLike(String value) {
            addCriterion("discountproductinventory.UsedTransNo like", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoNotLike(String value) {
            addCriterion("discountproductinventory.UsedTransNo not like", value, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoIn(List<String> values) {
            addCriterion("discountproductinventory.UsedTransNo in", values, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoNotIn(List<String> values) {
            addCriterion("discountproductinventory.UsedTransNo not in", values, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoBetween(String value1, String value2) {
            addCriterion("discountproductinventory.UsedTransNo between", value1, value2, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andUsedTransNoNotBetween(String value1, String value2) {
            addCriterion("discountproductinventory.UsedTransNo not between", value1, value2, "usedTransNo");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("discountproductinventory.`Status` is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("discountproductinventory.`Status` is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("discountproductinventory.`Status` =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`Status` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("discountproductinventory.`Status` <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`Status` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("discountproductinventory.`Status` >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`Status` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("discountproductinventory.`Status` >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`Status` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("discountproductinventory.`Status` <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`Status` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("discountproductinventory.`Status` <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`Status` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("discountproductinventory.`Status` in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("discountproductinventory.`Status` not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("discountproductinventory.`Status` between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("discountproductinventory.`Status` not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNull() {
            addCriterion("discountproductinventory.Deleted is null");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNotNull() {
            addCriterion("discountproductinventory.Deleted is not null");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualTo(Boolean value) {
            addCriterion("discountproductinventory.Deleted =", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.Deleted = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualTo(Boolean value) {
            addCriterion("discountproductinventory.Deleted <>", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.Deleted <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThan(Boolean value) {
            addCriterion("discountproductinventory.Deleted >", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.Deleted > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
            addCriterion("discountproductinventory.Deleted >=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.Deleted >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThan(Boolean value) {
            addCriterion("discountproductinventory.Deleted <", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.Deleted < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
            addCriterion("discountproductinventory.Deleted <=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.Deleted <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedIn(List<Boolean> values) {
            addCriterion("discountproductinventory.Deleted in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotIn(List<Boolean> values) {
            addCriterion("discountproductinventory.Deleted not in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
            addCriterion("discountproductinventory.Deleted between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
            addCriterion("discountproductinventory.Deleted not between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNull() {
            addCriterion("discountproductinventory.`CreateUser` is null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNotNull() {
            addCriterion("discountproductinventory.`CreateUser` is not null");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualTo(String value) {
            addCriterion("discountproductinventory.`CreateUser` =", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`CreateUser` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualTo(String value) {
            addCriterion("discountproductinventory.`CreateUser` <>", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`CreateUser` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThan(String value) {
            addCriterion("discountproductinventory.`CreateUser` >", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`CreateUser` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.`CreateUser` >=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`CreateUser` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThan(String value) {
            addCriterion("discountproductinventory.`CreateUser` <", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`CreateUser` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.`CreateUser` <=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.`CreateUser` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLike(String value) {
            addCriterion("discountproductinventory.`CreateUser` like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotLike(String value) {
            addCriterion("discountproductinventory.`CreateUser` not like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserIn(List<String> values) {
            addCriterion("discountproductinventory.`CreateUser` in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotIn(List<String> values) {
            addCriterion("discountproductinventory.`CreateUser` not in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserBetween(String value1, String value2) {
            addCriterion("discountproductinventory.`CreateUser` between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotBetween(String value1, String value2) {
            addCriterion("discountproductinventory.`CreateUser` not between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("discountproductinventory.CreateTime is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("discountproductinventory.CreateTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("discountproductinventory.CreateTime =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.CreateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("discountproductinventory.CreateTime <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.CreateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("discountproductinventory.CreateTime >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.CreateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("discountproductinventory.CreateTime >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.CreateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("discountproductinventory.CreateTime <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.CreateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("discountproductinventory.CreateTime <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.CreateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("discountproductinventory.CreateTime in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("discountproductinventory.CreateTime not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("discountproductinventory.CreateTime between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("discountproductinventory.CreateTime not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNull() {
            addCriterion("discountproductinventory.UpdateUser is null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNotNull() {
            addCriterion("discountproductinventory.UpdateUser is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualTo(String value) {
            addCriterion("discountproductinventory.UpdateUser =", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateUser = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualTo(String value) {
            addCriterion("discountproductinventory.UpdateUser <>", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateUser <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThan(String value) {
            addCriterion("discountproductinventory.UpdateUser >", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateUser > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.UpdateUser >=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateUser >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThan(String value) {
            addCriterion("discountproductinventory.UpdateUser <", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateUser < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualTo(String value) {
            addCriterion("discountproductinventory.UpdateUser <=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateUser <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLike(String value) {
            addCriterion("discountproductinventory.UpdateUser like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotLike(String value) {
            addCriterion("discountproductinventory.UpdateUser not like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIn(List<String> values) {
            addCriterion("discountproductinventory.UpdateUser in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotIn(List<String> values) {
            addCriterion("discountproductinventory.UpdateUser not in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserBetween(String value1, String value2) {
            addCriterion("discountproductinventory.UpdateUser between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotBetween(String value1, String value2) {
            addCriterion("discountproductinventory.UpdateUser not between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("discountproductinventory.UpdateTime is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("discountproductinventory.UpdateTime is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("discountproductinventory.UpdateTime =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("discountproductinventory.UpdateTime <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("discountproductinventory.UpdateTime >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("discountproductinventory.UpdateTime >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("discountproductinventory.UpdateTime <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("discountproductinventory.UpdateTime <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualToColumn(DiscountProductInventory.Column column) {
            addCriterion(new StringBuilder("discountproductinventory.UpdateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("discountproductinventory.UpdateTime in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("discountproductinventory.UpdateTime not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("discountproductinventory.UpdateTime between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("discountproductinventory.UpdateTime not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        private DiscountProductInventoryExample example;

        protected Criteria(DiscountProductInventoryExample example) {
            super();
            this.example = example;
        }

        public DiscountProductInventoryExample example() {
            return this.example;
        }

        @Deprecated
        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
            if (ifAdd) {
                add.add(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then) {
            if (condition) {
                then.criteria(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
            if (condition) {
                then.criteria(this);
            } else {
                otherwise.criteria(this);
            }
            return this;
        }

        public Criteria andLogicalDeleted(boolean deleted) {
            return deleted ? andDeletedEqualTo(DiscountProductInventory.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(DiscountProductInventory.Deleted.IS_DELETED.value());
        }

        @Deprecated
        public interface ICriteriaAdd {
            Criteria add(Criteria add);
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }

    public interface ICriteriaWhen {
        void criteria(Criteria criteria);
    }

    public interface IExampleWhen {
        void example(com.ecoolex.discount.sales.entity.DiscountProductInventoryExample example);
    }
}